package br.com.naybee.framework.client.componente.gwt.web;

import com.google.gwt.dom.client.AnchorElement;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.dom.client.HasClickHandlers;
import com.google.gwt.event.shared.HandlerRegistration;
import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.ui.ComplexPanel;

public class A extends ComplexPanel implements HasClickHandlers {

	private AnchorElement anchorElement = DOM.createAnchor().cast();

	public A() {
		setElement(anchorElement);
	}

	public HandlerRegistration addClickHandler(ClickHandler handler) {
		return addDomHandler(handler, ClickEvent.getType());
	}

	public void setText(String texto) {
		anchorElement.setInnerText(texto);
	}

	public void setClassName(String classe) {
		anchorElement.setClassName(classe);
	}

	public String getClassName() {
		return anchorElement.getClassName();
	}

	public String getText() {
		return anchorElement.getInnerText();
	}

	public void setId(String identificador) {
		anchorElement.setId(identificador);
	}

	public String getId() {
		return anchorElement.getId();
	}

}
